
package com.ds.common.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 数据库操作通用错误码
 *
 * @author fs
 */
@Getter
@AllArgsConstructor
public enum DaoErrorEnum implements ErrorEnum {

    /**
     * 未知错误
     */
    UNKNOWN_ERROR("UNKNOWN_ERROR", "未知错误"),

    /**
     * 数据库插入失败
     */
    INSERT_FAILED("INSERT_FAILED", "数据库插入失败"),

    /**
     * 数据库更新失败
     */
    UPDATE_FAILED("UPDATE_FAILED", "数据库更新失败"),

    /**
     * 数据库删除失败
     */
    DELETE_FAILED("DELETE_FAILED", "数据库删除失败");

    private final String code;

    private final String message;
}
